package com.submit.demo.controller;

import com.submit.demo.annotation.AuthIgnore;
import com.submit.demo.model.SubTask;
import com.submit.demo.repository.SubTaskRepository;
import com.submit.demo.service.SubTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("subTask")
public class SubTaskController {
    @Autowired
    private SubTaskService subTaskService;

    @AuthIgnore
    @PostMapping("fetchOne")
    public SubTask fetchOne(String sid, String tid){
        return subTaskService.findOne(sid, tid);
    }
}
